import {SOKT, DECREMENT} from './action-type';

export function counter(state, action) {
  console.log('counter()', state, action);
  switch (action.type) {
    case SOKT:
      return (state = {
        ...action,
      });
    case DECREMENT:
      return state - action.data;
    default:
      //初始状态
      return state;
  }
}
